import request from './request'

/**
 * 获取统计数据
 */
export const getStatistics = () => {
  return request.get('/admin/statistics')
}

/**
 * 获取用户增长趋势
 */
export const getUserGrowthTrend = (days = 30) => {
  return request.get('/admin/statistics/user-growth', { params: { days } })
}

/**
 * 获取学习活跃度趋势
 */
export const getStudyActivityTrend = (days = 7) => {
  return request.get('/admin/statistics/study-activity', { params: { days } })
}

